<%@ CODEPAGE=65001 %>
<%Response.Charset="UTF-8"%>
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
<META NAME="copyright" CONTENT="Copyright 2009-2010 - Martechina Co.Ltd" />
<META NAME="Author" CONTENT="劢格机械(中国)  Www.Martechina.Com" />
<META NAME="Keywords" CONTENT="" />
<META NAME="Description" CONTENT="" />
<TITLE>qq管理</TITLE>
<link href="css.css" rel="stylesheet" type="text/css">
<script language="javascript" src="../inc/Admin.js"></script>
</HEAD>
<!--#include file="../inc/Const.asp" -->
<!--#include file="../inc/ConnSiteData.asp" -->
<%
'cookie 验证
'if Instr(request.cookies("Martech_com")("AdminPurview"),"|13,")=0 then 
'  response.write ("<font color='red')>你不具有该管理模块的操作权限，请返回！</font>")
'  response.end
'end if

'session 验证
if Instr(session("AdminPurview"),"|25,")=0 then 
  response.write ("<font color='red')>你不具有该管理模块的操作权限，请返回！</font>")
  response.end
end if
'========判断是否具有管理权限
%>
<body>
<%
        s_id=request.QueryString("id")
        q_id=request.QueryString("q_id")
        select case request("action")
        Case "add" : add()
        Case "add_n" : add_n()
        Case "edit" : edit()
		Case "edit_n" : edit_n()
		Case "edit_n_ok" : edit_n_ok()
        Case "del" : del()
        Case "del_n" : del_n()
		Case "up_n" : up_n()
		Case "update" : update()
        Case Else 
	     main()
        End Select 
Sub add
if trim(request("q_s_name"))="" Then
        response.write"<SCRIPT language=JavaScript>alert('请输入成员名称！');javascript:history.go(-1)</SCRIPT>"
	    response.End 
Else
        set rs=server.CreateObject("adodb.recordset")
        rs.Open "select * from [Martech_qq_sort]", conn, 1, 3
        rs.AddNew
        rs("q_s_name")=trim(request("q_s_name"))
        rs("q_s_paixu")=int(request("q_s_paixu"))
        rs.Update
        rs.Close:set rs=nothing
        m_t="QQ在线咨询面板管理"
        m_s="·客服人员添加成功！"
        m_u="admin_qq.asp"
		m_time="1"
        Call Up_mes(m_t,m_s,m_u,m_time)
End If 
End Sub 

Sub add_n
        str=request("q_face")
        str=Replace(str,"../images/qq_face/","")
        str=Replace(str,".gif","")
        if trim(request("q_name"))="" Then
                response.write"<SCRIPT language=JavaScript>alert('请输入成员名称！');javascript:history.go(-1)</SCRIPT>"
         	    response.End 
        ElseIf request("q_num")="" Then 
                response.write"<SCRIPT language=JavaScript>alert('请输入QQ号码！');javascript:history.go(-1)</SCRIPT>"
	            response.End 
        ElseIf request("q_s_id")="" Then 
                response.write"<SCRIPT language=JavaScript>alert('请先添加部门！');javascript:history.go(-1)</SCRIPT>"
	            response.End 
        Else 
                set rs=server.CreateObject("adodb.recordset")
                rs.Open "select * from [Martech_qq]", conn, 1, 3
                rs.AddNew
                rs("q_name")=trim(request("q_name"))
                rs("q_num")=trim(request("q_num"))
                rs("q_face")=str
                rs("q_s_id")=int(request("q_s_id"))
                rs("q_paixu")=int(request("q_paixu"))
                rs.Update
                rs.Close:set rs=nothing
                m_t="QQ在线咨询面板管理"
                m_s="·部门添加成功！"
                m_u="admin_qq.asp"
		        m_time="1"
                Call Up_mes(m_t,m_s,m_u,m_time)
        End If 
End Sub 
'----------------------------------------

Sub edit 
        set rs=server.CreateObject("adodb.recordset")
        rs.open "select * from [Martech_qq_sort] where q_s_id=" &s_id, conn, 1, 3
        rs("q_s_name")=trim(request("q_s_name"))
        rs("q_s_paixu")=int(request("q_s_paixu"))
        rs.update
        rs.close:set rs=Nothing
        m_t="QQ在线咨询面板管理"
        m_s="·部门信息更新成功！"
        m_u="admin_qq.asp"
		m_time="1"
        Call Up_mes(m_t,m_s,m_u,m_time)
End Sub 
'--------------------------------
Sub edit_n_ok
        str=request("q_face")
        str=Replace(str,"../images/qq_face/","")
        str=Replace(str,".gif","")
        if trim(request("q_name"))="" Then
                response.write"<SCRIPT language=JavaScript>alert('请输入成员名称！');javascript:history.go(-1)</SCRIPT>"
         	    response.End 
        ElseIf request("q_num")="" Then 
                response.write"<SCRIPT language=JavaScript>alert('请输入QQ号码！');javascript:history.go(-1)</SCRIPT>"
	            response.End 
        ElseIf request("q_s_id")="" Then 
                response.write"<SCRIPT language=JavaScript>alert('请先添加部门！');javascript:history.go(-1)</SCRIPT>"
	            response.End 
        Else 
                set rs=server.CreateObject("adodb.recordset")
                rs.Open "select * from [Martech_qq] where q_id="&q_id, conn, 1, 3
                rs("q_name")=trim(request("q_name"))
                rs("q_num")=trim(request("q_num"))
                rs("q_face")=str
                rs("q_s_id")=int(request("q_s_id"))
                rs("q_paixu")=int(request("q_paixu"))
                rs.Update
                rs.Close:set rs=nothing
                m_t="QQ在线咨询面板管理"
                m_s="·客服人员信息更新成功！"
                m_u="admin_qq.asp"
		        m_time="1"
                Call Up_mes(m_t,m_s,m_u,m_time)
        End If 
End Sub 
'----------------------------------------
Sub del 
        conn.execute "delete from [Martech_qq_sort] where q_s_id=" &s_id
        conn.execute "delete from [Martech_qq] where q_s_id=" &s_id
        m_t="QQ在线咨询面板管理"
        m_s="·删除部门成功！<br>·删除客服人员成功！"
        m_u="admin_qq.asp"
		m_time="1"
        Call Up_mes(m_t,m_s,m_u,m_time)
End Sub 
'--------------------------------
Sub del_n 
        conn.execute "delete from [Martech_qq] where q_id=" &q_id
        m_t="QQ在线咨询面板管理"
        m_s="·删除客服人员成功！"
        m_u="admin_qq.asp"
		m_time="1"
        Call Up_mes(m_t,m_s,m_u,m_time)
End Sub 

Sub up_n
        conn.execute "update [Martech_qq] set q_paixu=q_paixu+1 where q_id="&q_id
        response.Redirect "admin_qq.asp"
        response.End 
End Sub 

Sub update()
        sys_oicq_x=trim(request("sys_oicq_x"))
        sys_oicq_y=trim(request("sys_oicq_y"))
        oicq_skin=trim(request("oicq_skin"))
        oicq_skin=Replace(oicq_skin,"../images/qq_skin/","")
        oicq_skin=Replace(oicq_skin,"_1.gif","")
        oicq_zt=trim(request("oicq_zt"))
        qq_zt=trim(request("qq_zt"))
       ' qq_wz=trim(request("qq_wz"))
       ' qq_ys=trim(request("qq_ys"))
		qq_show=Replace(trim(request("qq_show"))," ","")
        
        set rs=server.CreateObject("adodb.recordset")
        sql="select sys_oicq from [Martech_site]"
        rs.open sql, conn, 1, 3
        rs("sys_oicq") = sys_oicq_x&"$$"&sys_oicq_y&"$$"&oicq_skin&"$$"&oicq_zt&"$$"&Split(rs("sys_oicq"),"$$")(4)&"$$"&qq_zt&"$$1$$1$$,"&qq_show&",$$"
        rs.update
        rs.close
        m_t="QQ在线咨询面板管理"
        m_s="·QQ在线咨询面板设置成功！"
        m_u="admin_qq.asp"
		m_time="1"
        Call Up_mes(m_t,m_s,m_u,m_time)
End Sub 

Sub main 
sql="select top 1 sys_oicq from [Martech_site]"
Set rs = conn.execute(sql)
arr_sys_oicq = Split(rs("sys_oicq"),"$$")
sys_oicq_x = arr_sys_oicq(0)
sys_oicq_Y = arr_sys_oicq(1)
oicq_skin = arr_sys_oicq(2)
oicq_zt = arr_sys_oicq(3)
sys_qq = arr_sys_oicq(4)
qq_zt = arr_sys_oicq(5)
qq_wz = arr_sys_oicq(6)
qq_ys = arr_sys_oicq(7)
qq_show = arr_sys_oicq(8)
rs.close : Set rs = Nothing 
%>
<table border="0" cellspacing="1" cellpadding="0" height="0" align="center" width="100%" bgcolor="#B4B99E">
  <tr>
  <td>
<table border="0" cellspacing="1" cellpadding="3" bgcolor="#FFFFFF" align="center" width="100%">
          <form method="POST" action="?action=update">
            <tr> 
              <td class="classtop" colspan="2" height="30" align="right"> 
			    <table border="0" cellspacing="0" cellpadding="0" align="center" width="100%">
				  <tr>
				     <td width="50%">·· QQ在线咨询面板设置</td>
					 <td width="50%" align="right">
            <!-- <input type="button" name="submit1" value="生成QQ面板（JS）" class="button" style="width:140px;" onClick="location.href='?action=Jsqqonline&mes_type=0'">   -->        <input name="submit" type="image" src="../images/bt_app.gif" value=" 提交 ">&nbsp;<a href="#" onClick="location.href='?'"><img src="../images/bt_res.gif" border="0" alt=" 重填 "></a>&nbsp;<a href="#" onClick="location.href='javascript:history.back()'"><img src="../images/bt_bak.gif" border="0" alt=" 返回 "></a>
					 </td>
				   </tr>
				 </table>
			</td>
           </tr>
<!--<tr>
<td width="10%" class="classtd" height="30">面板坐标：</td>
<td width="90%" class="classtd" height="30">
X：<input type="text" name="sys_oicq_x" size="3" style="width:40px;" value="<%=sys_oicq_x%>" class="form">
Y：<input type="text" name="sys_oicq_y" size="3" style="width:40px;" value="<%=sys_oicq_y%>" class="form">

X=横坐标 Y=纵坐标
</td>
</tr>-->
<tr>
<td class="classtd" height="30">面板样式：</td>
<td class="classtd" height="30">
<select name="oicq_skin"  onchange="document.images['skin_face'].src=options[selectedIndex].value;">
   <%
   response.write"<option value='../images/qq_skin/"&oicq_skin&"_1.gif'>"&oicq_skin&"</option>"
   For i=1 To 7 
 response.write"<option value="
   If CInt(oicq_skin)=CInt(i) Then response.write "../images/qq_skin/"&i&"_1.gif" Else  response.write "../images/qq_skin/"&i&"_1.gif" End If 
     response.write">"&i&"</option>"
     Next
   %>
   </select> <img src="../images/qq_skin/<%=oicq_skin&"_1"%>.gif" id="skin_face" align="absmiddle"> 
</td>
</tr>
<tr>
<td class="classtd" height="30">个性选择：</td>
<td class="classtd" height="30">
开关设置：
<select name="qq_zt">
<option value="1" <%if qq_zt="1" then Response.Write"selected"%>>打开</option>
<option value="0" <%if qq_zt="0" then Response.Write"selected"%>>关闭</option>
</select>

检测在线状态：
<select name="oicq_zt">
<option value="1" <%if oicq_zt="1" then Response.Write"selected"%>>是</option>
<option value="0" <%if oicq_zt="0" then Response.Write"selected"%>>否</option>
</select>

<!--浮动位置：
<select name="qq_wz">
<option value="1" <%'if qq_wz="1" then Response.Write"selected"%>>居顶浮动</option>
<option value="0" <%'if qq_wz="0" then Response.Write"selected"%>>居底浮动</option>
</select>

样式：
<select name="qq_ys">
<option value="1" <%'if qq_ys="1" then Response.Write"selected"%>>浮动</option>
<option value="0" <%'if qq_ys="0" then Response.Write"selected"%>>固定</option>
</select>-->
<img src="../images/help.gif" align="absmiddle" alt="开启 检测在线状态 会影响网站的打开速度，建议关闭！">
</td>
</tr>

</form>
</table>
</td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0" align="center" width="100%"><tr><td height="8"></td></tr></table>
<table border="0" cellspacing="1" cellpadding="0" height="0" align="center" width="100%" bgcolor="#B4B99E">
  <tr>
  <td>
   <table border="0" cellspacing="1" cellpadding="4" bgcolor="#FFFFFF" align="center" width="100%">
<form name="form1" method="get" action="admin_qq.asp">
<tr>
  <td width="10%" class="classtop">添加部门</td>
  <td align="left" colspan="5" class="classtd">
   部门名称：<input type="text" name="q_s_name" size="6" class="form">&nbsp;&nbsp;排序：<input type="text" name="q_s_paixu" style="width:30px;" size="3" value="0" onKeyUp="value=value.replace(/[^\d\.]/g,'');" class="form">
   <input type="submit" name="button" value=" 添加 " class="button"><input type="hidden" name="action" value="add">
   </td>
</tr>
</form>
<form name="form2" method="post" action="admin_qq.asp">
<tr>
  <td width="10%" class="classtop">添加成员</td>
  <td align="left" colspan="5" class="classtd">
   成员名称：<input type="text" name="q_name" size="6" class="form">&nbsp;&nbsp;QQ号：<input type="text" name="q_num" size="6" onKeyUp="value=value.replace(/[^\d\.]/g,'');" class="form">&nbsp;&nbsp;头像：<select name="q_face"  onchange="document.images['qq_face'].src=options[selectedIndex].value;">
   <%For i=1 To 48 
         response.write"<option value=../images/qq_face/"&i&".gif>"&i&"</option>"
     Next
   %>
   </select> <img src="../images/qq_face/1.gif" id="qq_face"> 
   &nbsp;&nbsp;所属部门：<select name="q_s_id">
   <%Set rs=conn.execute("select q_s_id,q_s_name from [Martech_qq_sort] order by q_s_paixu desc")
     If rs.eof Then 
           response.write"<option value=''>=尚无部门=</option>"
     Else
	 Do While Not rs.eof 
           response.write"<option value="&rs("q_s_id")&">"&rs("q_s_name")&"</option>"	
	 rs.movenext
	 Loop
	 End If 
	 rs.close:Set rs=Nothing 
	%></select>
   &nbsp;&nbsp;排序：<input type="text" name="q_paixu" size="3" style="width:30px;" value="0" onKeyUp="value=value.replace(/[^\d\.]/g,'');" class="form">
   <input type="submit" name="button" value=" 添加 " class="button"><input type="hidden" name="action" value="add_n">
   </td>
</tr>
</form>
</table>
</td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0" align="center" width="100%"><tr><td height="8"></td></tr></table>
<table border="0" cellspacing="1" cellpadding="0" height="0" align="center" width="100%" bgcolor="#B4B99E">
  <tr>
  <td>
<table border="0" cellspacing="1" cellpadding="0" bgcolor="#FFFFFF" align="center" width="100%">
<tr class="classtd">
<%Set rs=conn.execute("select q_s_id,q_s_name,q_s_paixu from [Martech_qq_sort] order by q_s_paixu desc")
  If rs.eof Then 
         response.write"<tr class='classtd'><td height='30' align='center' colspan='7'>当前没有数据</td></tr>"
  Else
  i=1
  Do While Not rs.eof 
 %>
<form name="form3" method="get" action="admin_qq.asp">

  <td align="center" valign="top" colspan="3" width="50%" class="classtd">
  <table border="0" cellspacing="0" cellpadding="3" align="center" width="100%">
   <tr>
    <td class="classtd" colspan="2">
   部门名称：<input type="text" name="q_s_name" size="6" value="<%=rs("q_s_name")%>" class="form">&nbsp;&nbsp;排序：<input type="text" name="q_s_paixu" size="3" style="width:30px;" value="<%=rs("q_s_paixu")%>" onKeyUp="value=value.replace(/[^\d\.]/g,'');" class="form">
   <input type="submit" name="button" value="修改" class="button"> <input type="button" name="Submit2" value="删除" onClick="{if(confirm('确认删除么?')){location.href='?action=del&id=<%=rs("q_s_id")%>';}return false;}"  class="button"><input type="hidden" name="action" value="edit"><input type="hidden" name="id" value="<%=rs("q_s_id")%>">
     </td>
	 </tr>
	 <%Set rss=conn.execute("select q_face,q_name,q_num,q_id from [Martech_qq] where q_s_id="&rs("q_s_id")&" order by q_paixu desc")
	   If not rss.eof Then 
	   Do While Not rss.eof 
	  %>
	  <tr class="classtd">
	  <td>┊┄ <img src="../images/qq_face/<%=rss("q_face")%>.gif" align="absmiddle"> <%=rss("q_name")%>(<%=rss("q_num")%>)</td>
	  <td><a href=?action=up_n&q_id=<%=rss("q_id")%> title="向上移动">↑</a> <a href="?action=edit_n&q_id=<%=rss("q_id")%>">[编辑]</a> <a href="?action=del_n&q_id=<%=rss("q_id")%>"  onClick="return ConfirmDel();">[删除]</a></td>
	  </tr>
	  <%
	  rss.movenext
	  Loop
	  End If 
	  rss.close:Set rss=Nothing 
	  %>
	</table>
   </td>

</form>
<%
If i Mod 2 = 0 Then response.write"</tr>" End If 
 rs.movenext 
 i=i+1
 Loop
 End If 
 rs.close
 Set rs=Nothing 
%>
</table>
</td>
</tr>
</table>
<%
End Sub
%>

<%
Sub edit_n
q_id=CLng(request("q_id"))
Set rs=conn.execute("select * from [Martech_qq] where q_id="&q_id&"")
If rs.eof Then 
        response.write"<SCRIPT language=JavaScript>alert('没有此成员！');javascript:history.go(-1)</SCRIPT>"
        response.End 
Else 
%>
<table border="0" cellspacing="1" cellpadding="0" height="0" align="center" width="100%" bgcolor="#B4B99E">
  <tr>
  <td>
   <table border="0" cellspacing="1" cellpadding="4" bgcolor="#FFFFFF" align="center" width="100%">
  <tr>
 <td height=27 class=classtop align=center colspan=6>QQ面板管理</td>
</tr>
<form name="form2" method="get" action="admin_qq.asp">
<tr>
  <td width="10%" class="classtop">编辑成员</td>
  <td align="left" colspan="5" class="classtd">
   成员名称：<input type="text" name="q_name" size="6" value="<%=rs("q_name")%>" class="form">&nbsp;&nbsp;QQ号：<input type="text" name="q_num" size="6" value="<%=rs("q_num")%>" onKeyUp="value=value.replace(/[^\d\.]/g,'');" class="form">&nbsp;&nbsp;头像：<select name="q_face"  onchange="document.images['qq_face'].src=options[selectedIndex].value;">
   <%
  
   For i=1 To 48 
 response.write"<option value=../images/qq_face/"
   If CInt(rs("q_face"))=CInt(i) Then response.write""&i&".gif selected" Else  response.write""&i&".gif" End If 
     response.write">"&i&"</option>"
     Next
   %>
   </select> <img src="../images/qq_face/<%=rs("q_face")%>.gif" id="qq_face"> 
   &nbsp;&nbsp;所属部门：<select name="q_s_id">
   <%Set rss=conn.execute("select * from [Martech_qq_sort] order by q_s_paixu desc")
     If rss.eof Then 
           response.write"<option value=''>=尚无部门=</option>"
     Else
	 Do While Not rss.eof 
           response.write"<option value="&rss("q_s_id")&""
		   If CInt(rs("q_s_id"))=CInt(rss("q_s_id")) Then response.write" selected"
		   response.write">"&rss("q_s_name")&"</option>"	
	 rss.movenext
	 Loop
	 End If 
	 rss.close:Set rss=Nothing 
	%></select>
   &nbsp;&nbsp;排序：<input type="text" name="q_paixu" value="<%=rs("q_paixu")%>" size="3" style="width:30px;" value="0" onkeyup="value=value.replace(/[^\d\.]/g,'');" class="form">
   <input type="submit" name="button" value="修改" class="button">
   <input type="button" name="back" value="返回" onClick="javascript:history.go(-1);" class="button">
   <input type="hidden" name="action" value="edit_n_ok">
   <input type="hidden" name="q_id" value="<%=q_id%>">
   </td>
</tr>
</form>
</table>
</td>
</tr>
</table>
<%
End If 
End Sub 
sub Up_mes(m_t,m_s,m_u,m_time)
        response.write"<table border=0 cellspacing=1 cellpadding=0 height=0 align=center width=100% bgcolor=#B4B99E><tr><td>"&_
                      "<table width=100% border=0 align=center cellpadding=1 cellspacing=1 bgcolor=#FFFFFF>"&_
                      "<tr><td height=27 class=classtop align=center>"&m_t&"</td></tr>"&_
                      "<tr><td height=50 class=classtd>"&m_s&"</td></tr>"&_
		              "<tr><td height=30 class=classtd>·<font color=red>"&m_time&"</font> 秒后，跳转到：<a href="&m_u&">"&m_u&"</a></td></tr>"&_
                      "</table></td></tr></table>"&_
					  "<meta http-equiv='refresh'content='"&m_time&";URL="&m_u&"; charset=UTF-8'>"
		response.End 
End sub 
 
  If request("action") = "Jsqqonline" Then 
  sql="select sys_oicq from [Martech_site]"
Set rs1 = conn.execute(sql)
arr_sys_oicq = Split(rs1("sys_oicq"),"$$")
sys_oicq_x = arr_sys_oicq(0)
sys_oicq_Y = arr_sys_oicq(1)
oicq_skin = arr_sys_oicq(2)
oicq_zt = arr_sys_oicq(3)
sys_qq = arr_sys_oicq(4)
qq_zt = arr_sys_oicq(5)
qq_wz = arr_sys_oicq(6)
qq_ys = arr_sys_oicq(7)
qq_show = arr_sys_oicq(8)
rs1.close : Set rs1 = Nothing 
  
        If mes_type = 1 Then 
                response.write("<table width=""100%"" border=""0"" cellspacing=""1"" cellpadding=""1"" class=""classtd"">")
                response.write("<tr>")
                response.write("<td bgcolor=""#B2B2A6"" width=""300"" align=""left"">")
                response.write("<table width=""300"" border=""0"" cellspacing=""0"" cellpadding=""1"" height=""10""><tr><td bgcolor=ffffff height=""10""><img src=""images/bar.gif"" width=0 height=13 id=bar_p_img name=bar_p_img align=absmiddle></td></tr></table>")
                response.write("</td><td><span id=bar_p_txt2 name=bar_p_txt2 style=""font-size:9pt;color:red;""></span><span id=bar_p_txt1 name=bar_p_txt1 style=""font-size:9pt"">0</span><span style=""font-size:9pt"">%</span></td></tr>")
                response.write("</table>")
		End If 
        Dim Body_Jsqqonline
	    Body_Jsqqonline = ""
	    'Body_Jsqqonline = "var online= new Array();if (!document.layers)document.write('<div id=""divStayTopLeft"" style=""position:absolute"">')"&vbcrlf
        If CLng(qq_wz)=1 And CLng(qq_zt)=1 Then 
                Body_Jsqqonline = Body_Jsqqonline &"var verticalpos=""fromtop"""&vbcrlf
        ElseIf CLng(qq_wz)=0 And CLng(qq_zt)=1 Then 
                Body_Jsqqonline = Body_Jsqqonline &"var verticalpos=""frombottom"""&vbcrlf
        end If 
        Body_Jsqqonline = Body_Jsqqonline &"if (!document.layers)"&vbcrlf
        Body_Jsqqonline = Body_Jsqqonline &"document.write('</div>')"&vbcrlf
        Body_Jsqqonline = Body_Jsqqonline &"function JSFX_FloatTopDiv()"&vbcrlf
        Body_Jsqqonline = Body_Jsqqonline &"{"&_
	                            "var startX =document.body.clientWidth-"&cint(sys_oicq_x)&","
        if qq_wz=1 and qq_zt=1 Then 
                Body_Jsqqonline = Body_Jsqqonline &"startY = 10;"
        elseif qq_wz=0 and qq_zt=1 Then 
	        Body_Jsqqonline = Body_Jsqqonline &"startY = "&cint(sys_oicq_y)&";"&vbcrlf
        end If 
	    Body_Jsqqonline = Body_Jsqqonline &"var ns = (navigator.appName.indexOf(""Netscape"") != -1);"
	    Body_Jsqqonline = Body_Jsqqonline &"var d = document;"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"function ml(id){"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"if(d.layers)el.style=el;"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"el.sP=function(x,y){this.style.left=x;this.style.top=y;};"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"el.x = startX;"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"if (verticalpos==""fromtop"")"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"el.y = startY;"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"else{"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"el.y = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"el.y -= startY;"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"}return el;}"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"window.stayTopLeft=function()"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"{"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"if (verticalpos==""fromtop""){"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"var pY = ns ? pageYOffset : document.body.scrollTop;"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"ftlObj.y += (pY + startY - ftlObj.y)/8;"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"}else{"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"var pY = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"ftlObj.y += (pY - startY - ftlObj.y)/8;"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"}"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"ftlObj.sP(ftlObj.x, ftlObj.y);"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"setTimeout(""stayTopLeft()"", 10);"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"}"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"ftlObj = ml(""divStayTopLeft"");"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"stayTopLeft();"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"}"&vbcrlf
	    Body_Jsqqonline = Body_Jsqqonline &"JSFX_FloatTopDiv();"&vbcrlf
		Savehtml "../inc/Jsqqonline.js",Body_Jsqqonline
		If mes_type = 0 Then 
	            response.write("<script>alert('已完成！');</script>")  
		Else
				response.write("<script>bar_p_img.width=300;bar_p_txt2.innerHTML='';bar_p_txt1.innerHTML=""100"";</script>") 
		End If            		
End If 

Function Savehtml(filename,filebody)
        filename = server.mappath(filename)
        adTypeText=2
        adSaveCreateOverWrite=2
        Set objStream = Server.CreateObject("ADODB.Stream")
        With objStream
                .Type = adTypeText
                .Mode = adModeReadWrite
                .Open
                .Charset = "utf-8"
                .Position = objStream.Size
                .WriteText= filebody
                .SaveToFile FileName,adSaveCreateOverWrite
                .Close
        End With
End Function 
%>
</body>
</html>